import os
import json
from datetime import datetime
from event import event_main


if __name__ == "__main__":
    # 获取当前文件所在目录
    current_dir = os.path.dirname(__file__)
    print(current_dir)
    # 获取配置文件信息
    config_file_path = os.path.join(current_dir, 'config.json')
    with open(config_file_path, 'r', encoding='utf-8') as ff:
        config_info = json.load(ff)
    print(config_info)

    try:
        event_main(config_info)
    except BaseException as e:
        print("运行报错： 时间", datetime.now(), "， 原因：", e)

